package com.jzo2o.foundations.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jzo2o.api.foundations.dto.response.ServeAggregationResDTO;
import com.jzo2o.foundations.model.domain.Serve;

import com.jzo2o.foundations.model.dto.ServeTypeListDto;
import com.jzo2o.foundations.model.dto.response.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author itcast
 * @since 2023-07-03
 */
public interface ServeMapper extends BaseMapper<Serve> {
    /**
     * 根据区域查询服务列表
     * @param regionId
     * @return
     */
    List<ServeResDTO> queryServeListByRegionId(@Param("regionId") Long regionId);

    /**
     * 查询已开启的区域
     * @param regionId
     */
    List<ServeCategoryResDTO> findServeIconCategoryByRegionId(@Param("regionId") Long regionId);

    /**
     * 查询区域下开通的服务类型
     * @param regionId
     * @return
     */
    List<ServeTypeListDto> getServeTypeListByRegionId(@Param("regionId")Long regionId);

    /**
     * 查询区域下热门服务
     * @param regionId
     * @return
     */
    List<ServeAggregationSimpleResDTO> getHotServeList(@Param("regionId")Long regionId);

    /**
     * 根据id查服务
     * @param id
     * @return
     */
    ServeAggregationSimpleResDTO getServeById(@Param("id")Long id);
}
